This invention relates to transmitting data packets on a network so as to reduce data packet transmission loops.
Data packet looping can occur when there are parallel paths between two network devices, such as bridges. Initially, a “recipient” network device receives the data packet from a “transmitting” network device along one of the parallel paths. Upon receipt, the recipient device consults a stored forwarding table to determine an interface on the recipient device from which the data packet should be sent to reach the packet's intended destination.
If the forwarding table does not indicate which interface to use, the recipient device duplicates the packet and sends (i.e., “floods”) copies of the packet out all of its interfaces, except the interface from which the packet was originally received. This results in a copy of the data packet being forwarded back to the transmitting device along the other (parallel) path. This process is repeated in the transmitting device, resulting in a data packet transmission loop between the transmitting and receiving devices.
In general, in one aspect, the invention is directed to transmitting data packets on a network. The invention features determining if two data packets having a same feature were received by a network device within a predetermined period of time, and discarding one of the two data packets if the two data packets were received by the network device within the predetermined period of time. Since “looping” packets pass back and forth between devices quickly, discarding data packets received within the predetermined period of time reduces packet looping.
This aspect may also include one or more of the following features. A later-received one of the two data packets is discarded. The function of determining if two data packets having a same feature were received includes receiving the two data packets at the network device, obtaining a difference between a time that the first of the two data packets was received and a time that a second of the data packets was received, and comparing the difference to the predetermined period of time.
The time that the first data packet was received is stored in a memory of the network device. The feature of the data packets is a source network device address. The network device includes a designated network interface over which data packets having the feature are received. The network device determines if one of the two data packets was received over a network interface on the network device other than the designated network interface. The network device performs the remainder of the process if one of the two data packets was received over a non-designated interface.
One of the two data packets is transmitted from the network device if the two data packets were not received by the network device within the predetermined period of time. The one of the two data packets is a later-received data packet. A forwarding table in the network device is updated based on a source device address in the one of the two data packets. The forwarding table identifies interfaces on the network device that lead to devices on the network.
In general, in another aspect, the invention is directed to transmitting data packets from a network device having plural network interfaces. One of the plural network interfaces is designated for receiving data packets from a source address. First and second data packets are received from a device at the source address. It is determined if the second data packet was received over a network interface on the network device other than the designated network interface. If the second data packet was received over a network interface other than the designated network interface, it is determined if the first and second data packets were received within a predetermined period of time. If the first and second data packets were received within the predetermined period of time, the second data packet is discarded. If the first and second data packets were not received within the predetermined period of time, the second data packet is transmitted from the network device and a forwarding table on the network device is updated.
This aspect of the invention may include one or more of the following features. Updating the forwarding table includes changing the designated network interface to be the network interface over which the second data packet was received. The forwarding table identifies interfaces on the network device that lead to devices on the network. Determining if the first and second data packets were received within a predetermined period of time includes comparing a time that the first packet was received to a time that the second packet was received.
Other features and advantages of the invention will become apparent from the following description, including the claims and drawings.